# Copyright 2019 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

# NOTE: This file is auto generated by the elixir code generator program.
# Do not edit this file manually.

defmodule GoogleApi.CloudAsset.V1.Model.AccessSelector do
  @moduledoc """
  Specifies roles and/or permissions to analyze, to determine both the identities possessing them and the resources they control. If multiple values are specified, results will include roles or permissions matching any of them. The total number of roles and permissions should be equal or less than 10.

  ## Attributes

  *   `permissions` (*type:* `list(String.t)`, *default:* `nil`) - Optional. The permissions to appear in result.
  *   `roles` (*type:* `list(String.t)`, *default:* `nil`) - Optional. The roles to appear in result.
  """

  use GoogleApi.Gax.ModelBase

  @type t :: %__MODULE__{
          :permissions => list(String.t()) | nil,
          :roles => list(String.t()) | nil
        }

  field(:permissions, type: :list)
  field(:roles, type: :list)
end

defimpl Poison.Decoder, for: GoogleApi.CloudAsset.V1.Model.AccessSelector do
  def decode(value, options) do
    GoogleApi.CloudAsset.V1.Model.AccessSelector.decode(value, options)
  end
end

defimpl Poison.Encoder, for: GoogleApi.CloudAsset.V1.Model.AccessSelector do
  def encode(value, options) do
    GoogleApi.Gax.ModelBase.encode(value, options)
  end
end
